<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    
    <script src="http://cdn.static.runoob.com/libs/jquery/1.10.2/jquery.min.js"></script>
    <script>
        var dataa = 'demo';
        $.ajax({
            url: 'upfile.php',
            type: 'post',
            async: false,
            success: function (data) {
                console.log(data)
                dataa = 'leruge'
            }
        })
        console.log(dataa)
    </script>
</body>
</html>